/**
 * 路由配置
 * 所有页面路由都在这里配置（UMI需要在编译时知道所有路由）
 * 通过菜单数据控制哪些路由在菜单中显示
 */
export default [
  // 登录页面
  {
    path: '/login',
    component: '@/pages/login',
  },
  // 主布局容器
  {
    path: '/',
    component: '@/layouts/BasicLayout',
    routes: [
      // 默认重定向到登录页
      { path: '/', redirect: '/login' },
      // 欢迎页
      {
        path: '/welcome',
        name: '欢迎',
        component: '@/pages/welcome',
      },
      // Demo页面
      {
        path: '/demo',
        name: 'Demo',
        component: '@/pages/anyFrontUITest',
      },
      // any-front-ui 组件测试页面
      {
        path: '/any-front-ui-test',
        name: 'any-front-ui 测试',
        component: '@/pages/anyFrontUITest',
      },
      // 工作台
      {
        path: '/workBench/overview',
        name: '管理员工作台',
        component: '@/pages/workBench/overview',
      },
      {
        path: '/workBench/collectorBench',
        name: '催收员工作台',
        component: '@/pages/workBench/collectorBench',
      },
      // 策略管理
      {
        path: '/strategyManage/strategySetting',
        name: '派案策略管理',
        component: '@/pages/strategyManage/strategySetting',
      },
      {
        path: '/strategyManage/weightSetting',
        name: '权重策略管理',
        component: '@/pages/strategyManage/weightSetting',
      },
      {
        path: '/strategyManage/sortSetting',
        name: '排序模板管理',
        component: '@/pages/strategyManage/sortSetting',
      },
      // 数据管理
      {
        path: '/dataManage/realtime',
        name: '实时数据流',
        component: '@/pages/dataManage/realtime',
      },
      {
        path: '/dataManage/offline',
        name: '离线数据管理',
        component: '@/pages/dataManage/offline',
      },
      {
        path: '/dataManage/callList',
        name: '名单管理',
        component: '@/pages/dataManage/callList',
      },
      {
        path: '/dataManage/smsTemplate',
        name: '短信模版管理',
        component: '@/pages/dataManage/smsTemplate',
      },
      // 系统管理
      {
        path: '/systemManage/menu',
        name: '菜单管理',
        component: '@/pages/systemManage/menu',
      },
      {
        path: '/systemManage/dict',
        name: '数据字典',
        component: '@/pages/systemManage/dict',
      },
      {
        path: '/systemManage/org',
        name: '机构管理',
        component: '@/pages/systemManage/org',
      },
      {
        path: '/systemManage/position',
        name: '岗位管理',
        component: '@/pages/systemManage/position',
      },
      {
        path: '/systemManage/role',
        name: '角色管理',
        component: '@/pages/systemManage/role',
      },
      {
        path: '/systemManage/user',
        name: '用户管理',
        component: '@/pages/systemManage/user',
      },
    ],
  },
  // 404 页面
  { path: '/*', component: '@/pages/404' },
];
